<?php
//=======================================
//###################################
// Kayako Web Solutions
//
// Source Copyright 2001-2004 Kayako Infotech Ltd.
// Unauthorized reproduction is not allowed
// License Number: $%LICENSE%$
// $Author: vshoor $ ($Date: 2007/02/28 20:07:03 $)
// $RCSfile: upgrade.php,v $ : $Revision: 1.5 $ 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//###################################
//=======================================


if (!defined("INSWIFT")) {
	trigger_error("Unable to process $PHP_SELF", E_USER_ERROR);
}

if (in_array(MODULE_TICKETS, $registeredmodules))
{
		require_once ("./modules/tickets/tickets.php");
		require_once ("./modules/tickets/functions_tickets.php");
		$_SWIFT["query"]["create"]["ticketpostlocks"] = "CREATE TABLE ". TABLE_PREFIX ."ticketpostlocks (
																		ticketpostlockid INT UNSIGNED NOT NULL AUTO_INCREMENT,
																		ticketid INT UNSIGNED NOT NULL DEFAULT '0',
																		staffid INT UNSIGNED NOT NULL DEFAULT '0',
																		dateline INT UNSIGNED NOT NULL DEFAULT '0',
																		contents MEDIUMTEXT,
																		PRIMARY KEY (ticketpostlockid),
																		KEY ticketpostlocks1 (ticketid, staffid),
																		KEY ticketpostlocks2 (dateline)
																	);";
	$_SWIFT["query"]["alter"]["attachmentchunks"][] = "ALTER TABLE `". TABLE_PREFIX ."attachmentchunks` ADD INDEX attachmentchunks1 (attachmentid);";
}

execAllQueries();


upgrade_updateVersion("3.10.00");

?>